import { Menu } from 'antd';
import { MailOutlined, AppstoreOutlined, ShoppingCartOutlined } from '@ant-design/icons';
import React from 'react';
import { Layout } from 'antd';
import { useNavigate , Outlet} from 'react-router-dom';
const { Header, Footer, Sider, Content } = Layout;

function LhqRouter(props) {
    
   //-------------------------------------------☃️-----以 key 属性值跳转路由-----☃️-------------------------------------------
    
   var push = useNavigate();
    
   const goKeyrouter = function({ item, key, keyPath, domEvent }) {
       //-----🍌---🍌---🍌-----
       push(key);
   }
   
   //-------------------------------------------☃️-----以 key 属性值跳转路由-----☃️-------------------------------------------
   

    return (
        <div>
            <Menu theme='dark' mode="inline" defaultSelectedKeys={['key']}>
                <Menu.SubMenu onClick={ goKeyrouter } key="SubMenu" title="采购管理 " icon={<ShoppingCartOutlined />}>
                    <Menu.Item key="/index/supplier" >
                        供应商管理
                    </Menu.Item>
                    <Menu.Item key="/index/requirent" >
                        请购单管理
                    </Menu.Item>
                    <Menu.Item key="/index/shopping" >
                        采购单管理
                    </Menu.Item>
                    <Menu.Item key="/index/credit" >
                        退货单管理
                    </Menu.Item>
                </Menu.SubMenu>
            </Menu>
        </div>
    );
}

export default LhqRouter;